package com.x.service.api;

import com.x.service.entity.AutoComplete;
import com.x.service.entity.Base;
import com.x.service.entity.BookDetail;
import com.x.service.entity.BookList;
import com.x.service.entity.CatsList;
import com.x.service.entity.Chapter;
import com.x.service.entity.ChapterList;
import com.x.service.entity.ChaptersInfo;
import com.x.service.entity.DeviceInfo;
import com.x.service.entity.HotWord;
import com.x.service.entity.RangeList;
import com.x.service.entity.TagList;
import com.x.service.entity.Version;

import rx.Observable;

/**
 * Created by H on 18/5/9.
 */

public interface DataRepository {
    Observable<BookList> getRecommendList(String bookId);

    Observable<BookDetail> getBookDetial(String bookId);

    Observable<BookList> getBooksByTag(TagList.Tag tag, int start, int limit);

    Observable<BookList> getBooksByAuthor(String author, int start, int limit);

    Observable<BookList> searchBook(String query, int start, int limit);

    Observable<AutoComplete> autoComplete(String query);

    Observable<HotWord> getHotWord();

    Observable<ChaptersInfo> getChapters(String bookId);

    Observable<Chapter> getChapterRead(String link);

    Observable<TagList> getTagLst();

    Observable<CatsList> getCatList();

    Observable<BookList> getBookByCat(CatsList.Cat cat, int start, int limit);

    Observable<RangeList> getRangelist();

    Observable<BookList> getBooksByRangeId(String id);

    Observable<Base> reportDerice(DeviceInfo deviceInfo);

    Observable<Version> getVersion(String channelId);

    Observable<Base> addToLib(String token, String book);

    Observable<BookList> getBooksByIds(String bookId);
}
